package org.momo.rpc;

import org.momo.rpc.bootstrap.ProviderBootstrap;
import org.momo.rpc.bootstrap.model.ProviderMetaInfo;
import org.momo.rpc.provider.model.ProviderInfo;
import org.momo.rpc.service.OrderServiceImpl;
import org.momo.rpc.service.UserServiceImpl;

import java.util.ArrayList;
import java.util.List;

public class ProviderExample {

    public static void main(String[] args) {
        List<ProviderMetaInfo> providerMetaInfos = new ArrayList<>();

        ProviderMetaInfo userServiceMetaInfo = new ProviderMetaInfo(UserServiceImpl.class, "user", "v1.0");
        ProviderMetaInfo orderServiceMetaInfo = new ProviderMetaInfo(OrderServiceImpl.class, "order", "v1.0");

        providerMetaInfos.add(userServiceMetaInfo);
        providerMetaInfos.add(orderServiceMetaInfo);

        ProviderBootstrap.init(providerMetaInfos);
    }
}
